package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;


/**
 * @author oxiny
 */
@Data
@ApiModel("卡金流水记录表")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_charge_log")
public class ChargeLog extends Model<ChargeLog> {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    private Integer chargeId;

    @ApiModelProperty("来源类型 0充值 1订单 2冻结 3解冻 4扣除")
    private Integer targetType;

    @ApiModelProperty("来源ID")
    private Integer targetId;

    @ApiModelProperty("变动金额")
    private Integer price;

    @ApiModelProperty("变动前余额")
    private Integer befBalance;

    @ApiModelProperty("变动后余额")
    private Integer aftBalance;

    @ApiModelProperty("变动前冻结余额")
    private Integer befFroBalance;

    @ApiModelProperty("变动后冻结余额")
    private Integer aftFroBalance;

    private Date addTime;

    private Date updateTime;
}
